package com.lsc.www.day05;

public class OOTest02 {
    public static void main(String[] args) {
        People people = new People();
        //内存传递
//        People people1 = people;
        people.setName("张三");
        people.setSex("男");
        people.setAge(20);

        People people1 = new People();

        people1.setName("李四");
        people1.setSex("男");
        people1.setAge(18);
        //当people1指向people的堆内存空间时原本的people1指向的内存空间就没有任何的指向了
        //这时如果jvm中的垃圾回收机制在运行的化,他会将原本people1的堆内存空间给清除掉
        people1 = people;

    }
}
